package com.zsj.mysql.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsj.entity.StatisticRechargeBean;
import com.zsj.mysql.entity.DyMobileRecharge;
import com.zsj.mysql.entity.RechargeStatics;

import java.util.List;

/**
 * <p>
 * 字节手机充值表 服务类
 * </p>
 *
 * @author
 * @since
 */
public interface IDyMobileRechargeService extends IService<DyMobileRecharge> {

    List<DyMobileRecharge> getFinishByDayAndAppId(String month, Integer day, String appId);

    DyMobileRecharge getByOrderNo(String month, String orderNo);

    DyMobileRecharge getBySelfOrderNo(String month, String orderNo);

    boolean updateFinal(String month, DyMobileRecharge entity);

    boolean updateNotify(String month, Integer notifyStatus, String lastNotifyTime, String chargeNo);

    List<DyMobileRecharge> getNeedNotify(String month, String lastTime, Integer notifyTimes);

    List<StatisticRechargeBean> getSuccStatistic(String month, String txnDate, String appId);

    List<StatisticRechargeBean> getTotalStatistic(String month, String txnDate, String appId);

    List<StatisticRechargeBean> getRateStatistic(String month, String txnDate, Integer time, String appId);

    boolean updateReorder(String month, Integer reorderStatus, String lastReorderTime, String chargeNo);

    /**
     * 自动重发任务查询待重发数据，需要重发状态为待重发，交易状态为处理中，加上时间范围、重发次数限制
     *
     * @param month
     * @param txnDate
     * @param reorderTimes
     * @param startTime
     * @param endTime
     * @param count
     * @return
     */
    List<DyMobileRecharge> getNeedReorder4Job(String month, String txnDate, Integer reorderTimes, String startTime, String endTime, Integer count);

    List<RechargeStatics> getAmtStatistic(String month, String finishDate);

}
